<?php

namespace App\Models;

use App\ShopStatusType;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Shop extends Core
{
    use SoftDeletes;

    const TABLE = 'shops';
    protected $table = self::TABLE;

    public function account()
    {
        return $this->belongsTo('App\Models\User', 'id');
    }

    public function scopeShopAvailable($query){

        return $query->where('status','<>',ShopStatusType::$Cancel['code']);

    }



}
